Hello and welcome to
this demonstration on using flowchart
activity in Studio. In this video, you will learn to create a workflow
that will ask for the user's name
and marks and then display the exam outcome
in a message box. Let's begin. In UiPath Studio, search for a flowchart activity
in the Activities panel, and drag and drop it
in the Designer panel. Rename the flowchart
activity as Demo, and add an annotation to it. Double-click to view
the flowchart activity. Search for an Input
Dialog activity in the Activities panel, and drag and drop it on
the start nodes down arrow in the flowchart container to connect it to the node. Rename the activity
as First Name. Double-click to open it. In double-quotes,
enter the title text "Name" in the Dialog Title, in the label text enter Student Name in the
Input Label box. From the Variables panel. Create a variable,
say FirstName, with variable type as String, and Scope as Flowchart Demo. Now go to the
Properties panel of the user input Dialog Activity, and enter the variable First
Name in its result property. Navigate back to the flowchart. Search for an Input
Dialog activity in the Activities panel, and drag and drop it below the first Input Dialog activity. Rename the activity as intMarks, and double-click to open it. In double-quotes,
enter the title text "Marks" in the Dialog Title. In the label text, enter your marks in numeric
in the Input Label box. From the Variables panel, create a variable intMarks
with variable type as int32 and Scope
as Flowchart Demo. Go to the Properties panel of this user Input Dialog activity, and enter the variable intMarks
in its result property. Navigate back to the flowchart, search for a Flow
Decision activity in the Activities panel, and drag and drop it below
the Input Dialog activity. Rename the flow decision
activity has Passed or Failed. A flow decision
activity has two sides. The left is the true side, and the right is the false side. If a given condition is true, the workflows or
the activities on the left side of this
activity will execute. Similarly, if a given
condition is false, the workflows or
the activities on the right side of this
activity will execute. Navigate to the Properties panel of the Flow Decision activity. In the condition textbox, enter the expression intMarks greater than or equal to 60. This expression means that 60 or more than 60 marks are
required to pass the exam. Next, insert two
Message Box activities. Place one on the left, that is the true side, and another on the right, that is the false side of the Flow Decision activity,
rename both activities. Double-click to view the
first Message Box activity. In the text area enter the text, "Congratulations"
plus FirstName plus "you have passed the exam." Navigate back to the flowchart. Double-click to view the
second message box activity. In the Text area, enter text, "Hello" plus FirstName plus
"You have failed the exam." Remember to use the plus
symbols while writing the text. Navigate back to the flowchart. Let's save the
project and run it. Enter the name of a student
in the Name box, say Ron, and click okay, and 75 in the Marks box, and click okay. You can see the message saying, "Congratulations Ron, you
have passed the exam." Now re-run the workflow. This time enter mark
says 50 for Ron. Here you can see
the message saying, "Hello Ron, you have
failed the exam." It is encouraged to create
the workflow as demonstrated, frame your own decisions and try the flowchart
activity on your own. Thank you for watching.